-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add ability to explain-debug all nodes #1563
feat: Add ability to explain-debug all nodes #1563
Conversation
Codecov ReportPatch coverage:
@@ Coverage Diff @@
## develop #1563 +/- ##
===========================================
- Coverage 72.29% 72.28% -0.01%
===========================================
Files 185 185
Lines 18389 18477 +88
===========================================
+ Hits 13294 13355 +61
- Misses 4055 4074 +19
- Partials 1040 1048 +8
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 4 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
thought: It feels quite odd to me that |
We already have access to the attributes with the simple explain call. The debug explain (atleast the first iteration of it) should visualize the full plan graph nodes. i.e. the However this makes me think that similar to how we were gunna add an option to |
I'm not sure you are understanding me. Typically |
Is "simple" an actual log level? I have never seen that, if it is then I can see the confusion. The different explain types aren't log/verbosity levels, they do different things. For example
That will be possible though for both |
What is the point of multiple types of explain, if you have to decorate them all with attributes to make them useful? Why not have one type of explain with all the attributes? |
@AndrewSisley made a ticket to reflect our standup discussion: #1570 |
for default explain that was missing. This commit can be safely ignored as it is not related to this PR.
Debug explain has no attributes, so we just build it externally using the `Kind()` calls. Note: This explain also includes non-explainable nodes.
10bbbbb
to
1e186cc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is a mad amount of tests that you have managed to write for this, I skimmed through them and they all appeared sensible to have - thanks a bunch for adding them all :)
Prod code looked good too, minus the feature-change requested RE type that we discussed in the standup. Just added an out of scope suggestion for the future that I spotted whilst reading.
idsLabel = "ids" | ||
joinRootLabel = "root" | ||
joinSubTypeLabel = "subType" | ||
keysLabel = "_keys" | ||
limitLabel = "limit" | ||
offsetLabel = "offset" | ||
sourcesLabel = "sources" | ||
spansLabel = "spans" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion (out of scope): These are all public, and I think they should live in client/request/explain.go
- might be worth adding a ticket if you agree.
Same also goes for the attribute tags and node names (if they are in planner atm)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I appreciate this suggestion! Would be much nicer. Will open a ticket.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ticket: #1571
bug bash result: |
Resolves sourcenetwork#948 ## Description Implements a new type of explain called `debug` which dumps all plan nodes (even non-explainable nodes) as a graph (has no attributes). Usage is similar to other explain types, but would just do `@explain(type: debug)` instead of `@explain(type: simple)` or `@explain(type: execute)`. Example Request: ``` query @Explain(type: debug) { Author (groupBy: [age]) { age _group { name } } } ``` Response: ``` { "data": [ "explain": { "selectTopNode": { "groupNode": { "selectNode": { "pipeNode": { "scanNode": {} } } } } } ] } ```
Resolves #948
Description
Implements a new type of explain called
debug
which dumps all plan nodes (even non-explainable nodes) as a graph (has no attributes).Usage is similar to other explain types, but would just do
@explain(type: debug)
instead of@explain(type: simple)
or@explain(type: execute)
.Example Request:
Response:
For reviewers
How has this been tested?
Integration tests
Specify the platform(s) on which this was tested: